package com.sugon.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.DevSolidCapitalDao;
import com.sugon.entity.DevSolidCapitalEntity;
import com.sugon.service.DevSolidCapitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 设备固资编号关联表Service实现类
 *
 * @author sugon
 * @date 2019-07-26 14:20:49
 */
@Service("devSolidCapitalService")
public class DevSolidCapitalServiceImpl implements DevSolidCapitalService {
    @Autowired
    private DevSolidCapitalDao devSolidCapitalDao;

    @Override
    public DevSolidCapitalEntity queryObject(String id) {
        return devSolidCapitalDao.queryObject(id);
    }

    @Override
    public List<DevSolidCapitalEntity> queryList(Map<String, Object> map) {
        return devSolidCapitalDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return devSolidCapitalDao.queryTotal(map);
    }

    @Override
    public int save(DevSolidCapitalEntity devSolidCapital) {
        devSolidCapital.setId(RandomUtil.randomString(32));
        return devSolidCapitalDao.save(devSolidCapital);
    }

    @Override
    public int update(DevSolidCapitalEntity devSolidCapital) {
        return devSolidCapitalDao.update(devSolidCapital);
    }

    @Override
    public int delete(String id) {
        return devSolidCapitalDao.delete(id);
    }

    @Override
    public int deleteBatch(String[] ids) {
        return devSolidCapitalDao.deleteBatch(ids);
    }
}
